package action;


import java.util.Iterator;
import java.util.List;

import org.apache.struts2.ServletActionContext;
import org.hibernate.Session;

import po.*;

import bean.EmailBean;
import bo.HibernateSessionFactory;

import com.opensymphony.xwork2.ActionSupport;

public class EmailDeleteA extends ActionSupport{
	private int id;
	
	public String execute(){
		
	
			
			Session session = HibernateSessionFactory.getSession();

			Email e = new EmailDAO().findById(id);
			e.setAcceptflag("3");
			session.save(e);
				
			session.beginTransaction().commit();
	
			return "Accept";
		}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}
	
}
